/**
 * @author AdinZ
 * @date 2022/12/11 23:00
 *
 */
const state = {
    show: false,
    type: undefined
}
const mutations = {
    setShow: (state, show) => {
        state.show = show;
    },
    setType: (state, type) => {
        state.type = type
    },

}
const actions = {
    show({commit}, type) {
        commit('setType', type)
        commit('setShow', true)
    },
    hide({commit}) {
        commit('setShow', false)
        commit('setType', undefined)
    }

}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}